<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%@ include file="/WEB-INF/jsp/common/header.jsp" %>
<script type="text/javascript" src="${root}/easyui/jeasyui-extensions/jquery.euploadify.js"></script>
<script type="text/javascript" src="${root}/easyui/plugins/uploadify/jquery.uploadify.js"></script>
<link type="text/css" rel="stylesheet" href="${root}/easyui/plugins/uploadify/uploadify.css">

</head>
<body>
	 
	<input id="euploadify1" name="euploadify1" class="easyui-euploadify" type="text" data-options="
           width: 500, multi: false, 
           auto: false,
           showStop: false,
           showCancel: false,
           // fileObjName: 'myfile', // 如果需要改动参数名
           // disabled: true,
           required: true,
           swf: '${root}/easyui/plugins/uploadify/uploadify.swf',
           uploader: '${root}/upload',
           onUploadSuccess: function(file, data){
           	  var json = JSON.parse(data);  // 1. 服务器端返回图片名字, 2.springmvc中做一个路径映射  3. 用js修改img 的src
              $('#i1').attr('src', '${root}/image/' + json.filename);
           }
           " />
     <!-- multi : 是否支持多文件上传
     	  auto : 是否自动开始上传
     	  swf:  是利用了flash 的上传文件功能, 指swf动画的位置
     	  uploader： controller 的地址
     -->
     <img alt="" src="${root}/image/blank.gif" id="i1">
</body>
</html>